package com.shop.common.enums.user;

import lombok.Getter;

/**
 * 提现类型
 */
@Getter
public enum AccountTypeEnum {

    BALANCE(1, "余额"),
    BROKERAGE(2, "佣金积分"),
    COIN(3, "TG"),
    INTEGRAL(4,"签到积分");
    ;

    private int key;
    private String name;

    AccountTypeEnum(int key, String name) {
        this.key = key;
        this.name = name;
    }

    public static AccountTypeEnum val(int key) {
        for (AccountTypeEnum enumObj : AccountTypeEnum.values()) {
            if(enumObj.key == key) {
                return enumObj;
            }
        }
        return null;
    }
}
